<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<head>
</head>
<ui:composition template="/PANEL/layouts/MasterPage.xhtml">


	<ui:define name="content">
		<h:form>
		<br/>
		<br/>
		<br/>
			<p:dataTable emptyMessage="Kayıt Bulunamadı" id="fDonationTable"
				style="font-size:13px" value="#{fDonationBean.fdontiaons}"
				var="fDonation" paginator="true" rows="10"
				paginatorPosition="bottom"
				paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
				rowsPerPageTemplate="5,10,15" widgetVar="fdon" tableStyle="text-align:center;">

				<f:facet name="header">
					<h:outputText value="#{fDonationBean.tableHeader}"></h:outputText>
					<br />
					<p:outputPanel style="float:right;">
						<h:outputText value="Genel Arama:" />
						<p:spacer width="10" />
						<p:inputText id="globalFilter" onkeyup="fdon.filter()"
							style="width:150px;height:10px;" />
					</p:outputPanel>

				</f:facet>
				<p:column filterBy="#{fDonation.instıtutıon.institutionname}"
					filterMatchMode="contains" filterStyle="height:10px;">
					<f:facet name="header">
						<h:outputText value="Kurum Adı"></h:outputText>
					</f:facet>

					<h:outputText value="#{fDonation.instıtutıon.institutionname}"></h:outputText>
				</p:column>
				<p:column filterBy="#{fDonation.donatıonmethod.donationmethodname}"
					filterOptions="#{fDonationBean.dTypes}" filterMatchMode="exact" filterStyle="height:10px;">
					<f:facet name="header">
						<h:outputText value="Bağış Tipi"></h:outputText>
					</f:facet>

					<h:outputText
						value="#{fDonation.donatıonmethod.donationmethodname}"></h:outputText>
				</p:column>
				<p:column>
					<f:facet name="header">

						<h:outputText value="Bağış Tarihi"></h:outputText>
						<br />
						<p:calendar value="#{fDonationBean.calendarDate}"
							pattern="dd-MM-yyyy" style="height:10px;">
							<p:ajax event="dateSelect"
								listener="#{fDonationBean.getFilterDate}"
								update="fDonationTable" />
						</p:calendar>
					</f:facet>

					<h:outputText value="#{fDonation.createddate}">
						<f:convertDateTime type="date" dateStyle="long"></f:convertDateTime>
					</h:outputText>
				</p:column>

				<p:column filterBy="#{fDonation.price}" filterMatchMode="startsWith" filterStyle="height:10px;">
					<f:facet name="header">
						<h:outputText value="Bağış Miktarı"></h:outputText>
					</f:facet>

					<h:outputText value="#{fDonation.price}"></h:outputText>
				</p:column>
				<p:column filterBy="#{fDonation.user2.name}" filterStyle="height:10px;" >
					<f:facet name="header">
						<h:outputText  value="Bağışı Alan Kişi"></h:outputText>
					</f:facet>

					<h:outputText value="#{fDonation.user2.name}"></h:outputText>
				</p:column>


			</p:dataTable>
		</h:form>
	</ui:define>

</ui:composition>
</html>